text view: Don't popup after drag selection
authorMatthias Clasen <mclasen@redhat.com>
Sun, 7 Jun 2015 16:19:16 +0000 (12:19 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Mon, 8 Jun 2015 10:55:21 +0000 (06:55 -0400)
Don't show the touch selection popover after a selection drag
ends. Instead, the popover will be triggered by an explicit
touch on the selection.

gtk/gtktextview.c

index d061db263a9b899e7dca84f09c4f05ae29a48635..9f794fc87c81e9e031a28c056c8ba6d08d50587d 100644 (file)
@@ -7263,10 +7263,7 @@ gtk_text_view_drag_gesture_end (GtkGestureDrag *gesture,
 
   /* Check whether the drag was cancelled rather than finished */
   if (!gtk_gesture_handles_sequence (GTK_GESTURE (gesture), sequence))
-    {
-      gtk_text_view_selection_bubble_popup_unset (text_view);
-      return;
-    }
+    return;
 
   event = gtk_gesture_get_last_event (GTK_GESTURE (gesture), sequence);
   device = gdk_event_get_source_device (event);
@@ -7274,10 +7271,6 @@ gtk_text_view_drag_gesture_end (GtkGestureDrag *gesture,
     (gtk_get_debug_flags () & GTK_DEBUG_TOUCHSCREEN) != 0 ||
     gdk_device_get_source (device) == GDK_SOURCE_TOUCHSCREEN;
 
-  if (!clicked_in_selection && is_touchscreen &&
-      (!priv->selection_bubble || !gtk_widget_get_visible (priv->selection_bubble)))
-    gtk_text_view_selection_bubble_popup_set (text_view);
-
   if (!is_touchscreen && clicked_in_selection &&
       !gtk_drag_check_threshold (GTK_WIDGET (text_view), start_x, start_y, x, y))
     {